import 'package:seedfour/generated/json/base/json_field.dart';
import 'package:seedfour/generated/json/file_list_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class FileListEntity {
  String? dirName;
  int? total;
  List<FileData>? data;

  FileListEntity();

  factory FileListEntity.fromJson(Map<String, dynamic> json) =>
      $FileListEntityFromJson(json);

  Map<String, dynamic> toJson() => $FileListEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class FileData {
  int? id;
  String? caseId;
  String? name;
  int? fileId;
  String? fileName;
  int? deliveryType;
  String? fileSize;
  int? createdAt;

  FileData();

  factory FileData.fromJson(Map<String, dynamic> json) =>
      $FileDataFromJson(json);

  Map<String, dynamic> toJson() => $FileDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
